/*    */ package com.engine;
/*    */ 
/*    */ import java.io.FileInputStream;
/*    */ import java.io.FileNotFoundException;
/*    */ import java.io.IOException;
/*    */ import java.util.Properties;
/*    */ 
/*    */ public class ReadConfig
/*    */ {
/*  9 */   String fileprops = "sq.props";
/*    */   static Properties props;
/* 11 */   static ReadConfig INSTANCE = null;
/*    */ 
/*    */   private static void createInstance(String fileprops) throws FileNotFoundException, IOException
/*    */   {
/* 15 */     INSTANCE = new ReadConfig(fileprops);
/*    */   }
/*    */ 
/*    */   public static synchronized ReadConfig getInstance(String fileprops) throws FileNotFoundException, IOException {
/* 19 */     if (INSTANCE == null) createInstance(fileprops);
/* 20 */     return INSTANCE;
/*    */   }
/*    */ 
/*    */   public static synchronized void removeInstance() {
/* 24 */     INSTANCE = null;
/*    */   }
/*    */ 
/*    */   private ReadConfig(String fileprops) throws FileNotFoundException, IOException {
/* 28 */     if (fileprops != null)
/* 29 */       this.fileprops = fileprops;
/* 30 */     props = new Properties();
/* 31 */     props.load(new FileInputStream(this.fileprops));
/*    */   }
/*    */ 
/*    */   public static String GET(String key)
/*    */   {
/* 36 */     return props.getProperty(key);
/*    */   }
/*    */ }

/* Location:           F:\16 2\SQ.jar
 * Qualified Name:     com.engine.ReadConfig
 * JD-Core Version:    0.6.0
 */